import React, { Component } from 'react';
import {
    StyleSheet,
    Text,
    View,
    TouchableOpacity,
    Image,
} from 'react-native';
import ItemDetail from "./ItemDetail";
import FetchNetDataComponent from "./FetchNetDataComponent";
import MyNav from "../extendsComponent/MyNav";
export default class HomeComponent extends Component {
    static navigationOptions = {
        // tabBarLabel: '首页',
        // tabBarIcon: <Image style={{width:20,height:20}} source={require("../res/home_default.png")} />,
        // headerTitleStyle:{
        //     alignSelf:'center'
        // },
    };
    render() {
        const { navigate } = this.props.navigation;
        return (
            <View style={styles.container}>

                <TouchableOpacity style={{height:60,backgroundColor:'orange',justifyContent: 'center',}}
                                  onPress={() => navigate('ItemDetail', { title: '详情页',des:'点击我返回' })} >
                    <Text>点击进详情页</Text>
                </TouchableOpacity>

            </View>
        );
    }
}
const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#F5FCFF',
    },
    icon: {
        width: 20,
        height: 20
    }
});
